﻿
using HBase.mongo;
using MongoDB.Bson;
using MongoDB.Driver;
 
using System;
using System.Collections.Generic;
using static System.Runtime.CompilerServices.RuntimeHelpers;

namespace HBase {
    public class MessageDto :MongoPageDto {
        public DateTime? begin;
        public DateTime? end;
        public String info;
        public int sysId;
        public String tableName;


        public override FilterDefinition<BsonDocument> getRestrict() {

            BsonDocument bd = new BsonDocument();
          
            if( !String.IsNullOrEmpty(info) ) {

                bd["keyCode"] =new BsonRegularExpression( "/" + info + "/");
     
            }

           // MServer.timeBettwen(bd ,"time" ,begin ,end);
            
                  
            return bd;
        }

        public override String  getOrder() {
       
            return "{status:-1,_id:-1}";
        }
    }
}
